package com.dhecp.project.business.controller;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.dhecp.common.core.page.TableDataInfo;
import com.dhecp.core.constant.ModuleTable;
import com.dhecp.project.business.domain.LogsticsPatternDetails;
import com.dhecp.project.business.service.LogsticsPatternDetailsService;
import com.dhecp.project.common.controller.BaseModuleController;

/**
 * 物流名称详情
 * @Author fxz
 * @Date 2022/12/07
 */
@Controller
@RequestMapping("/business/logsticspatternDetails")
public class LogsticsPatternDetailsController extends BaseModuleController {

    private String moduleTable = ModuleTable.LOGSTICS_PATTERN_DETAILS;

    @Autowired
    private LogsticsPatternDetailsService logsticsPatternDetailsService;

    /**
     *@Description: 查询页 列表数据
     * @Author: Jason
     * @date: 2022-09-02 11:41
     */
//    @RequiresPermissions("business:logsticspatternDetails:list")
    @GetMapping("/list")
    @ResponseBody
    public TableDataInfo list(@RequestParam Map<String, Object> params){
        params.put("moduleTable", moduleTable);
        List<LogsticsPatternDetails> list = new ArrayList<LogsticsPatternDetails>();
        try {
            list = logsticsPatternDetailsService.queryList(params);
        } catch (Exception e) {
            e.printStackTrace();
            return getDataTable(this.getExceptionMessage(e).toString());
        }
        return getDataTable(list);
    }
}
